#!/usr/bin/python3
# -*- coding:utf-8 -*-
""""
   @Author: 叶建伟
   @Email: yejw46507@hundsun.com
   @Time: 2022/6/14 19:32
   @File: suspicious_rule_config.py
"""
import time
from 线下客户管理.线下客户共用脚本.open_menu import open_menu, arm_form_fill
from 基础公共脚本.步骤检查_hui2 import check_table, check_table_rows,FE
from 基础公共脚本.common_util import check_tabs,auto_fill_form,check_label

def suspicious_trade_rule(input_data=None, ui_expect=None):
    open_menu({'子系统名称': '反洗钱系统', '菜单名称': '可疑交易管理/可疑交易规则'})


def suspicious_trade_rule_search(input_data=None, ui_expect=None):
    open_menu({'子系统名称': '反洗钱系统', '菜单名称': '可疑交易管理/可疑交易规则'})

    FE.button(idname={
        'xpath': '//div[@class="search-item"]/descendant::span[@class="h-select-placeholder"]'}).click()
    FE.button(idname={
        'xpath': '//div/ul/li[contains(text(),"' + input_data.get("可疑规则") + '")]'}).click()

def suspicious_trade_rule_updateInfo(input_data=None, ui_expect=None):
    open_menu({'子系统名称': '反洗钱系统', '菜单名称': '可疑交易管理/可疑交易规则'})
    FE.button(idname={
        'xpath': '//div[@class="search-item"]/descendant::span[@class="h-select-placeholder"]'}).click()
    FE.button(idname={
        'xpath': '//div/ul/li[contains(text(),"' + input_data.get("可疑规则") + '")]'}).click()
    FE.button(idname={'xpath': '//h2[contains(text(), "基础信息")]/span/i[contains(@class,"h-icon-editor")]'}).click()


def suspicious_trade_rule_updatePlan(input_data=None, ui_expect=None):
    open_menu({'子系统名称': '反洗钱系统', '菜单名称': '可疑交易管理/可疑交易规则'})
    FE.button(idname={
        'xpath': '//div[@class="search-item"]/descendant::span[@class="h-select-placeholder"]'}).click()
    FE.button(idname={
        'xpath': '//div/ul/li[contains(text(),"' + input_data.get("可疑规则") + '")]'}).click()
    FE.button(idname={'xpath': '//h2[contains(text(), ",参数配置")]/span/i[contains(@class,"h-icon-editor")]'}).click()

